{extend name="public/iframe" /}

{block name="top"}
{:load_assets('flatpickr,select2,multi-upload,form','css')}
{/block}

{block name="content"}
<div class="card card-body {eq name='layout' value='dialog'}shadow-none{/eq}">									
    <form action="" method="post" id="validate-form">
        <input type="hidden" name="id" value="{$info.id}>">
        <div class="row mb-sm-3">
            <label  class="col-xxl-1 col-lg-2 col-sm-3 col-12 col-form-label required">工作小组</label>
            <div class="col-xl-4 col-sm-5 col-12 form-item">
                <select class="form-select" name="groups_id"  data-control="select2" data-language="zh-CN" data-allow-clear="false" data-placeholder="请选择" data-rule="工作小组:required">
                    {foreach name="groups" item="group"}
                    <option value="{$group.id}" {eq name="info.groups_id" value="group.id"}selected{/eq}>{$group.groups_name}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="row mb-sm-3">
            <label  class="col-xxl-1 col-lg-2 col-sm-3 col-12 col-form-label required">姓名</label>
            <div class="col-lg-10 col-sm-9 col-12 form-item">
                <input type="text" class="form-control" name="name" value="{$info.name}" data-rule="姓名:required;length(2~10)">
            </div>
        </div>
        <div class="row mb-sm-3">
            <label  class="col-xxl-1 col-lg-2 col-sm-3 col-12 col-form-label required">性别</label>
            <div class="col-lg-10 col-sm-9 col-12 mt-sm-2 form-item">
                <div class="form-check form-check-custom  form-check-inline">
                    <label class="form-check-label">
                        <input class="form-check-input w-20px h-20px" type="radio" name="sex"  value="1" {eq name="info.sex" value="1"}checked{/eq} data-rule="状态:checked"> 男
                    </label>
                </div>
                <div class="form-check  form-check-custom form-check-inline">
                    <label class="form-check-label">
                        <input class="form-check-input w-20px h-20px" type="radio" name="sex"  value="2" {eq name="info.sex" value="2"}checked{/eq} > 女
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-sm-3">
            <label  class="col-xxl-1 col-lg-2 col-sm-3 col-12 col-form-label required">出生日期</label>
            <div class=" col-xl-3 col-sm-6 col-12 form-item">
                <input type="text" name="birthday" class="form-control" autocomplete="off" data-control="flatpickr" data-control-type="date" data-allow-input="true" value="{$info.birthday}" data-rule="出生日期:required">
            </div>
        </div>
        <div class="row mb-sm-3">
            <label  class="col-xxl-1 col-lg-2 col-sm-3 col-12 col-form-label required">联系电话</label>
            <div class="col-lg-10 col-sm-9 col-12 form-item">
                <input type="text" class="form-control" name="mobile" value="{$info.mobile}" data-rule="联系电话:mobile;length(11)">
            </div>
        </div>
        <div class="row mb-sm-3">
            <label  class="col-xxl-1 col-lg-2 col-sm-3 col-12 col-form-label">备用电话</label>
            <div class="col-lg-10 col-sm-9 col-12 form-item">
                <input type="text" class="form-control" name="tel" value="{$info.tel}" data-rule="联系电话:length(~20)">
            </div>
        </div>
        <div class="row mb-3">
            <label  class="col-xxl-1 col-lg-2 col-sm-3 col-12 col-form-label">证件照</label>
            <div class="col-xl-10 col-sm-9 col-12 form-item">
                {:build_upload_template('idcard_imgs',$info.idcard_imgs,'off',500,500,0,2)}
            </div>
        </div>
        <div class="row mb-sm-3">
            <label  class="col-xxl-1 col-lg-2 col-sm-3 col-12 col-form-label required">入职时间</label>
            <div class=" col-xl-3 col-sm-6 col-12 form-item">
                <input type="text" name="job_date" class="form-control" autocomplete="off" data-control="flatpickr" data-control-type="date" data-allow-input="true" value="{$info.job_date}" data-rule="入职时间:required">
            </div>
        </div>
        <div class="row  mb-sm-3">
            <label  class="col-xxl-1 col-lg-2 col-sm-3 col-12 col-form-label required">排序</label>
            <div class="col-lg-10 col-sm-9 col-12 form-item">
                <input type="number" class="form-control" name="sort" value="{$info.sort}" data-rule="排序:required;integer;range(0~10000)">
                <span class="form-text text-muted">数字越小越排前</span>
            </div>
        </div>
        <div class="row mb-sm-3">
            <label  class="col-xxl-1 col-lg-2 col-sm-3 col-12 col-form-label required">状态</label>
            <div class="col-lg-10 col-sm-9 col-12 mt-sm-2 form-item">
                <div class="form-check form-check-custom  form-check-inline">
                    <label class="form-check-label">
                        <input class="form-check-input w-20px h-20px" type="radio" name="status"  value="1" {eq name="info.status" value="1"}checked{/eq} data-rule="状态:checked"> 合作中
                    </label>
                </div>
                <div class="form-check  form-check-custom form-check-inline">
                    <label class="form-check-label">
                        <input class="form-check-input w-20px h-20px" type="radio" name="status"  value="2" {eq name="info.status" value="2"}checked{/eq} > 合作暂停
                    </label>
                </div>
                <div class="form-check  form-check-custom form-check-inline">
                    <label class="form-check-label">
                        <input class="form-check-input w-20px h-20px" type="radio" name="status"  value="3" {eq name="info.status" value="3"}checked{/eq} > 合作解除
                    </label>
                </div>
            </div>
        </div>
        <div class="row mb-sm-3">
            <label  class="col-xxl-1 col-lg-2 col-sm-3 col-12 col-form-label">备注</label>
            <div class="col-lg-10 col-sm-9 col-12 form-item">
                <input type="text" class="form-control" name="remark" value="{$info.remark}" data-rule="备注:length(~50)">
            </div>
        </div>
        {include file="public/formfooter" /}
    </form>
</div>
{/block}

{block name="bottom"}
{:load_assets('flatpickr,select2,multi-upload,form','js')}
{/block}